package cn.cyty.midway.card.po;

import java.util.Date;

import com.tuweisoft.tt.potts.pump.oo.annotion.Entity;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.Primarykey;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.choose.Item;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.choose.PBoolean;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.num.Money;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.num.PInteger;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.text.Password;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.text.Text;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.time.PTimestamp;
import com.tuweisoft.tt.potts.pump.oo.runtime.PumpObject;

@Entity(id="T_CARD", title="卡", dataField="id")
public class Card implements PumpObject {

	private static final long serialVersionUID = -7194022080200276066L;

	@Text(id="CARD_ID", title="编号", minLength=64, required=true, unique=true)
	@Primarykey(increment=true)
	private String id;
	
	@Text(id="CARD_CODE", title="卡号", minLength=255)
	private String code;
	
	@Password(id="CARD_PASSWORD", title="密码")
	private String password;
	
	@Password(id="CARD_PAYPASSWORD", title="支付密码")
	private String payPassword;
	
	@Money(id="CARD_BALANCE", title="金额", required=true)
	private float balance;
	
	@PBoolean(id="CARD_ACTIVATION", title="是否激活")
	private boolean activation;
			
	@PTimestamp(id="CARD_ACTIVATIONTIME", title="激活时间")
	private Date activationtime;
	
	@Item(id="CARD_CATEGORY", title="卡类型")
	private CardCategory category;
	
	@Item(id="CARD_SCOPE", title="适用范围")
	private CardScope scope;

	@PInteger(id="CARD_COUNT", title="次数")
	private int count;
	
	@PBoolean(id="CARD_ENABLE", title="可用性")
	private boolean enable;
	
	@Item(id="CARD_STATE", title="状态")
	private CardState tate;
	
	@PTimestamp(id="CARD_VALID", title="有效期")
	private Date ValidTime;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPayPassword() {
		return payPassword;
	}

	public void setPayPassword(String payPassword) {
		this.payPassword = payPassword;
	}

	public float getBalance() {
		return balance;
	}

	public void setBalance(float balance) {
		this.balance = balance;
	}

	public boolean isActivation() {
		return activation;
	}

	public void setActivation(boolean activation) {
		this.activation = activation;
	}

	public Date getActivationtime() {
		return activationtime;
	}

	public void setActivationtime(Date activationtime) {
		this.activationtime = activationtime;
	}

	public CardCategory getCategory() {
		return category;
	}

	public void setCategory(CardCategory category) {
		this.category = category;
	}

	public CardScope getScope() {
		return scope;
	}

	public void setScope(CardScope scope) {
		this.scope = scope;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public CardState getTate() {
		return tate;
	}

	public void setTate(CardState tate) {
		this.tate = tate;
	}

	public Date getValidTime() {
		return ValidTime;
	}

	public void setValidTime(Date validTime) {
		ValidTime = validTime;
	}
	
}
